<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
  <link rel="stylesheet" href="__PUBLIC__/Css/public.css" />
  <style type="text/css">
	.add-role{
		display:inline-block;
		width:100px;
		height:26px;
		line-height:26px;
		text-align:center;
		border:1px solid blue;
		border-radius:4px;
		margin-left:20px;
		cursor:pointer;
	}
  </style>

  <script type="text/javascript" src="__PUBLIC__/Js/jquery-1.7.2.min.js"></script>
  <script type="text/javascript">
  <!--
		$(function(){
			$('.add-role').click(function(){
				var obj = $(this).parents('tr').clone();
				obj.find('.add-role').remove();
				$('#last').before(obj);
			}
			)
		}
		)
  //-->
  </script>
 </head>
 <body>
	<form method="post" action="{:U('Admin/Rbac/addUserHandle')}">
	
		<table class='table'>
			<tr>
				<td align="right" width='45%'>用户账号：</td>
				<td>
					<input type="text" name="username">
				</td>
			</tr>
			<tr>
				<td align="right">密码：</td>
				<td>
					<input type="password" name="password">
				</td>
			</tr>
			<tr>
				 <td align="right">所属角色：</td>
				 <td>	
						<select name="role_id[]">
							<option value="" >请选择角色</option>
							<foreach name='role' item='v'>
								<option value="{$v['id']}">{$v.name}({$v.remark})</option>
							</foreach>
						</select>
						<span class="add-role">添加一个角色</span>
				 </td>
				 
			</tr>
			<tr id="last">
				<td align="center" colspan='2'><input type="submit" value="保存添加"></td>
			</tr>
		</table>
			
	</form>
  
 </body>
</html>
